<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2RevoluteJointDef Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structb2_revolute_joint_def-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2RevoluteJointDef Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="b2_revolute_joint_8h_source.html">b2RevoluteJoint.h</a>&gt;</code></p>

<p>Inherits <a class="el" href="structb2_joint_def.html">b2JointDef</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6401b2a663533415d032a525e4fa2806"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a6401b2a663533415d032a525e4fa2806">Initialize</a> (<a class="el" href="classb2_body.html">b2Body</a> *<a class="el" href="structb2_joint_def.html#a8cd54c93da396be75a9788f2c6897f05">bodyA</a>, <a class="el" href="classb2_body.html">b2Body</a> *<a class="el" href="structb2_joint_def.html#aa4f4dee2fbcd12187b19506b60e68e3d">bodyB</a>, const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;anchor)</td></tr>
<tr class="separator:a6401b2a663533415d032a525e4fa2806"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a76337d07aa63232a7b20d50decc862ae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a76337d07aa63232a7b20d50decc862ae"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a76337d07aa63232a7b20d50decc862ae">localAnchorA</a></td></tr>
<tr class="memdesc:a76337d07aa63232a7b20d50decc862ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">The local anchor point relative to bodyA's origin. <br/></td></tr>
<tr class="separator:a76337d07aa63232a7b20d50decc862ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f33bc1d9f6c22043a5ff2f1d89f04e0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f33bc1d9f6c22043a5ff2f1d89f04e0"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a3f33bc1d9f6c22043a5ff2f1d89f04e0">localAnchorB</a></td></tr>
<tr class="memdesc:a3f33bc1d9f6c22043a5ff2f1d89f04e0"><td class="mdescLeft">&#160;</td><td class="mdescRight">The local anchor point relative to bodyB's origin. <br/></td></tr>
<tr class="separator:a3f33bc1d9f6c22043a5ff2f1d89f04e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1858d897d5fea04c5e606a1ff73f64f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1858d897d5fea04c5e606a1ff73f64f8"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a1858d897d5fea04c5e606a1ff73f64f8">referenceAngle</a></td></tr>
<tr class="memdesc:a1858d897d5fea04c5e606a1ff73f64f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">The bodyB angle minus bodyA angle in the reference state (radians). <br/></td></tr>
<tr class="separator:a1858d897d5fea04c5e606a1ff73f64f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2eaefc5fc5caf879cfd59ebcd852b756"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2eaefc5fc5caf879cfd59ebcd852b756"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a2eaefc5fc5caf879cfd59ebcd852b756">enableLimit</a></td></tr>
<tr class="memdesc:a2eaefc5fc5caf879cfd59ebcd852b756"><td class="mdescLeft">&#160;</td><td class="mdescRight">A flag to enable joint limits. <br/></td></tr>
<tr class="separator:a2eaefc5fc5caf879cfd59ebcd852b756"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24d0b2638a01405c77bd1c0de3e53de8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a24d0b2638a01405c77bd1c0de3e53de8"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a24d0b2638a01405c77bd1c0de3e53de8">lowerAngle</a></td></tr>
<tr class="memdesc:a24d0b2638a01405c77bd1c0de3e53de8"><td class="mdescLeft">&#160;</td><td class="mdescRight">The lower angle for the joint limit (radians). <br/></td></tr>
<tr class="separator:a24d0b2638a01405c77bd1c0de3e53de8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a692cfe333ad12afd5753a6ec54e39a66"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a692cfe333ad12afd5753a6ec54e39a66"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a692cfe333ad12afd5753a6ec54e39a66">upperAngle</a></td></tr>
<tr class="memdesc:a692cfe333ad12afd5753a6ec54e39a66"><td class="mdescLeft">&#160;</td><td class="mdescRight">The upper angle for the joint limit (radians). <br/></td></tr>
<tr class="separator:a692cfe333ad12afd5753a6ec54e39a66"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa94d9e66be9f03818d0cfbd9c70b2996"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa94d9e66be9f03818d0cfbd9c70b2996"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#aa94d9e66be9f03818d0cfbd9c70b2996">enableMotor</a></td></tr>
<tr class="memdesc:aa94d9e66be9f03818d0cfbd9c70b2996"><td class="mdescLeft">&#160;</td><td class="mdescRight">A flag to enable the joint motor. <br/></td></tr>
<tr class="separator:aa94d9e66be9f03818d0cfbd9c70b2996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aced7cf768f4dcc3561576a39c7b92ec4"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aced7cf768f4dcc3561576a39c7b92ec4"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#aced7cf768f4dcc3561576a39c7b92ec4">motorSpeed</a></td></tr>
<tr class="memdesc:aced7cf768f4dcc3561576a39c7b92ec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">The desired motor speed. Usually in radians per second. <br/></td></tr>
<tr class="separator:aced7cf768f4dcc3561576a39c7b92ec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fc1b67fe6d1bc31f88cc2cfd681fe30"><td class="memItemLeft" align="right" valign="top">float32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_revolute_joint_def.html#a9fc1b67fe6d1bc31f88cc2cfd681fe30">maxMotorTorque</a></td></tr>
<tr class="separator:a9fc1b67fe6d1bc31f88cc2cfd681fe30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_structb2_joint_def"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_structb2_joint_def')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="structb2_joint_def.html">b2JointDef</a></td></tr>
<tr class="memitem:a470f2879b24adb05facbd49f338856fb inherit pub_attribs_structb2_joint_def"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a470f2879b24adb05facbd49f338856fb"></a>
b2JointType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_joint_def.html#a470f2879b24adb05facbd49f338856fb">type</a></td></tr>
<tr class="memdesc:a470f2879b24adb05facbd49f338856fb inherit pub_attribs_structb2_joint_def"><td class="mdescLeft">&#160;</td><td class="mdescRight">The joint type is set automatically for concrete joint types. <br/></td></tr>
<tr class="separator:a470f2879b24adb05facbd49f338856fb inherit pub_attribs_structb2_joint_def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a07eb150daaaa52fc09c3bcf402b295fe inherit pub_attribs_structb2_joint_def"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a07eb150daaaa52fc09c3bcf402b295fe"></a>
void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_joint_def.html#a07eb150daaaa52fc09c3bcf402b295fe">userData</a></td></tr>
<tr class="memdesc:a07eb150daaaa52fc09c3bcf402b295fe inherit pub_attribs_structb2_joint_def"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use this to attach application specific data to your joints. <br/></td></tr>
<tr class="separator:a07eb150daaaa52fc09c3bcf402b295fe inherit pub_attribs_structb2_joint_def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cd54c93da396be75a9788f2c6897f05 inherit pub_attribs_structb2_joint_def"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8cd54c93da396be75a9788f2c6897f05"></a>
<a class="el" href="classb2_body.html">b2Body</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_joint_def.html#a8cd54c93da396be75a9788f2c6897f05">bodyA</a></td></tr>
<tr class="memdesc:a8cd54c93da396be75a9788f2c6897f05 inherit pub_attribs_structb2_joint_def"><td class="mdescLeft">&#160;</td><td class="mdescRight">The first attached body. <br/></td></tr>
<tr class="separator:a8cd54c93da396be75a9788f2c6897f05 inherit pub_attribs_structb2_joint_def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa4f4dee2fbcd12187b19506b60e68e3d inherit pub_attribs_structb2_joint_def"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4f4dee2fbcd12187b19506b60e68e3d"></a>
<a class="el" href="classb2_body.html">b2Body</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_joint_def.html#aa4f4dee2fbcd12187b19506b60e68e3d">bodyB</a></td></tr>
<tr class="memdesc:aa4f4dee2fbcd12187b19506b60e68e3d inherit pub_attribs_structb2_joint_def"><td class="mdescLeft">&#160;</td><td class="mdescRight">The second attached body. <br/></td></tr>
<tr class="separator:aa4f4dee2fbcd12187b19506b60e68e3d inherit pub_attribs_structb2_joint_def"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef099a1f89b64e230173b6016848ea9b inherit pub_attribs_structb2_joint_def"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef099a1f89b64e230173b6016848ea9b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structb2_joint_def.html#aef099a1f89b64e230173b6016848ea9b">collideConnected</a></td></tr>
<tr class="memdesc:aef099a1f89b64e230173b6016848ea9b inherit pub_attribs_structb2_joint_def"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set this flag to true if the attached bodies should collide. <br/></td></tr>
<tr class="separator:aef099a1f89b64e230173b6016848ea9b inherit pub_attribs_structb2_joint_def"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because:</p>
<ol type="1">
<li>you might not know where the center of mass will be.</li>
<li>if you add/remove shapes from a body and recompute the mass, the joints will be broken. </li>
</ol>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a6401b2a663533415d032a525e4fa2806"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2RevoluteJointDef::Initialize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classb2_body.html">b2Body</a> *&#160;</td>
          <td class="paramname"><em>bodyA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classb2_body.html">b2Body</a> *&#160;</td>
          <td class="paramname"><em>bodyB</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;&#160;</td>
          <td class="paramname"><em>anchor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Initialize the bodies, anchors, and reference angle using a world anchor point. </p>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a9fc1b67fe6d1bc31f88cc2cfd681fe30"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float32 b2RevoluteJointDef::maxMotorTorque</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The maximum motor torque used to achieve the desired motor speed. Usually in N-m. </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li><a class="el" href="b2_revolute_joint_8h_source.html">b2RevoluteJoint.h</a></li>
<li>b2RevoluteJoint.cpp</li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
